//using ajaxslt lib
if(typeof(xpathParse) == "function"){
	// xPath
	var xPath = function(oNodes, sXPath){
		if(oNodes != null){
			var result = xpathParse(sXPath).evaluate(new ExprContext(oNodes));
			if(result.booleanValue() == true) return result.value;
			else return false;
		} else return false;
	};

	// xml to string translator using XMLSerializer
	var xml2str = function(src){
		if(src.nodeType >= 2 && src.nodeType <= 4) return src.nodeValue;
		else return xmlText(src);
	};
	
	// access to xPath object
	var xPathObject = function(oNodes, sXPath){
		return xpathParse(sXPath).evaluate(new ExprContext(oNodes));
	};
	
	// xPath string
	var xPath2s = function(oNodes, sXPath){
		if(oNodes != null){
			var result = xpathParse(sXPath).evaluate(new ExprContext(oNodes));
			if(result.booleanValue() == true){
				var collect = "";
				for(var t=0; t<result.value.length; t++){
					var nodesCheck = result.value[t].childNodes;
					if(nodesCheck.length == 1 && nodesCheck[0].nodeType >= 2 && nodesCheck[0].nodeType <= 4) collect += result.stringValue();
					else collect += xmlText( result.value[t] );
				}
				return collect;
			} else return false;
		} else return false;
	};
}
